<!DOCTYPE html>
<html lang="zh">
<head>
	<th:block th:include="include :: header('文件上传')" />
	<th:block th:include="include :: bootstrap-fileinput-css" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>绩效考核上传生成</h5>
                    </div>
                    <div class="ibox-content">
                    	<div class="form-group">
                            <label class="font-noraml">《月度绩效考核汇总表》上传生成《个人月度绩效考核表》</label>
	                        <div class="file-loading">
					            <input class="file" id="fileinput" type="file" multiple data-min-file-count="1" data-show-preview="false" data-theme="fas" 
					            		data-upload-url="/performance/examine/upload/generate" data-allowed-file-extensions='["xls","xlsx"]'
					            		data-enctype='multipart/form-data' />
					        </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <iframe id="filedownload" src="#" style="display:none;"></iframe>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: bootstrap-fileinput-js" />
    <script type="text/javascript">
    $(document).ready(function () {
        $("#fileinput").on("fileuploaded", function(event, data, proviewId, index) {
            console.info(data);
            //window.open('/performance/examine/download/'+data.response.msg);
            $('#filedownload').attr('src', '/performance/examine/download/'+data.response.msg+"?r="+new Date().getTime());
        });
        
    });
    </script>
</body>
</html>
